package github.ziwukun.jsonql.orm;

import github.ziwukun.jsonql.lang.CmpOpr;

/**
 * 外键链接的容器属性
 * ForeignModelProp = FmProp
 * @author Hugo.Yu
 */
class FmPropImpl implements FmProp{
	private static final long serialVersionUID = 8223371044247733125L;
	String propName;
	boolean single;
	ModelImpl ofModel;
	ModelImpl propModel;
	//FmContainerImpl propCtn;
	CtnProp fmProp;
	
	FmPropImpl(FmPropBuilder builder,ModelImpl ofModel){
		FmPropBuilder.instanceFmProp(builder, this,ofModel);
	}
	
	@Override
	public String propName() {
		return propName;
	}

	@Override
	public boolean single() {
		return single;
	}

	@Override
	public boolean support(CmpOpr symbol) {
		return false;
	}

	@Override
	public boolean sortable() {
		return false;
	}

	@Override
	public Model ofModel() {
		return ofModel;
	}

	@Override
	public Model propModel() {
		return propModel;
	}

//	@Override
//	public FmContainer propCtn() {
//		return propCtn;
//	}

	@Override
	public CtnProp linkProp() {
		return fmProp;
	}

}
